<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>图片列表</title></head><script type="text/javascript" src="/Public/masonry-site/js/jquery-1.7.1.min.js"></script><script type="text/javascript" src="/Public/masonry-site/jquery.masonry.min.js"></script><script type="text/javascript" src="/Public/masonry-site/js/jquery.infinitescroll.min.js"></script><!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--><style type="text/css">body{background: url("http://d.lanrentuku.com/down/js/xiangce-830/images/pinstripe.gif") repeat scroll 0 0 transparent;}
*{margin:0px; padding:0px;}
/*img{margin:5px;}*/
.item {
  margin: 5px;
  padding:4px;
  float: left;
  /*overflow:hidden;*/
  text-align:center;
  border:1px solid #999;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.item:hover {
    box-shadow: 1px 1px 7px #777777;
}
.item img{border:none;}
/* Infinite Scroll loader */
#infscr-loading { 
  text-align: center;
  z-index: 100;
  position: fixed;
  left: 45%;
  bottom: 40px;
  width: 200px;
  padding: 10px;
  background: #000; 
  opacity: 0.8;
  color: #FFF;
  -webkit-border-radius: 10px;
     -moz-border-radius: 10px;
          border-radius: 10px;
}
.col1 {}
.col2 {}
.col3 {}
</style><script type="text/javascript">$(function(){
	var $container = $('#container');
    
    $container.imagesLoaded(function(){
      $container.masonry({
        itemSelector: '.item',
        columnWidth: 134,
		//columnWidth: 200,
/*		customCallback:function(){//回调函数
    	      $container.parents('#root_container').css('height', (parseInt($container.css('height')) + 20) + 'px');
    	},*/
		isAnimated:true,//是否使用动画，默认false
		//isAnimated: true
/*		animationOptions: */
		
      });
    });

    $container.infinitescroll({
      navSelector  : '#page-nav',    // 导航的选择器，会被隐藏
      nextSelector : '#page-nav a',  // 包含下一页链接的选择器
      itemSelector : '.item',     // 你将要取回的选项(内容块)
	  loading: {
          finishedMsg: '<em>暂无更多结果</em>',
          msgText: '<em>加载中……</em>',
          img: 'http://kuping.wallba.com/Public/masonry-site/images/loading.gif'
      }

    },
    function( newElements ) {
        $('#infscr-loading').stop(true, true).show();//图片加载完成之前继续显示加载中1
		
        var $newElems = $( newElements ).css({ opacity: 0 });
        $newElems.imagesLoaded(function(){
			$('#infscr-loading').hide();//图片加载完成之前继续显示加载中2
         	$newElems.animate({ opacity: 1 });
         	$container.masonry( 'appended', $newElems, false);
        });
      }
    );
});
function ShowItem(obj){return false;
	$obj = $(obj);
	/*$item_obj = $obj.parent().parent();
	$("#container").append($item_obj);
	$item_obj.fadeIn();//淡入*/
	/*var offset = $item_obj.offset();
	$item_obj.offset({top:offset.top+80});
	$item_obj.animate({
	   top:offset.top, opacity: 'show'
	}, "slow");*/
	//自动设置规范化高度
	$height = $obj.height();
	if(!document.height){
		document.height=$height;
	}
	if(document.height != $height){
		$obj.height(document.height);
	}
}
function downimg(obj){
	if(window.external){
		window.external.wappDownloadFiles(obj.href,'jpg,gif,png',false);
		return false;
	}
	return true;

}
</script><body><div id="container"><?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="item <?php if($vo['thumb_w'] > $vo['thumb_h']): ?>col2<?php else: ?>col1<?php endif; ?>"><a href="<?php echo ($vo['imgurl']); ?>" onclick="return downimg(this);" ><img width="114" height="171" onload="ShowItem(this);" src="<?php echo ($vo['thumb']); ?>" /></a></div><?php endforeach; endif; else: echo "" ;endif; ?></div><nav id="page-nav"><a href="<?php echo U("index?ijn=0");;?>"></a></nav></body></html>